<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use dosamigos\datetimepicker\DateTimePicker;//时间
/* @var $this yii\web\View */
/* @var $model common\models\memtrack\Memtrack */
/* @var $form yii\widgets\ActiveForm */
$id = Yii::$app->request->get()['memberid'];
$member =\common\models\member\Member::findOne($id);

?>

<div class="memtrack-form">

    <?php $form = ActiveForm::begin(); ?>
    <input type="hidden" name="Memtrack[member]" value="<?= $member->username ?>" />
    <input type="hidden" name="Memtrack[memberid]" value="<?= $id ?>" />
    <?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'category')->textInput(['maxlength' => true]) ?>

    <div>
        <div class="form-group field-classteam-starttime required" style="width: 300px">
            <label class="control-label" for="classteam-starttime">开始时间</label>
            <?= DateTimePicker::widget([
                'model' => $model,
                'attribute' => 'start_time',
                'language' => 'zh-CN',
                'size' => 'ms',
                'clientOptions' => [
                    'autoclose' => true,
                    'linkFormat' => 'yyyy-mm-dd  HH:ii ',
                    'todayBtn' => true
                ]
            ]);?>
        </div>
    </div>
    <div>
        <div class="form-group field-classteam-starttime required" style="width: 300px">
            <label class="control-label" for="classteam-endtime">开始时间</label>
            <?= DateTimePicker::widget([
                'model' => $model,
                'attribute' => 'end_time',
                'language' => 'zh-CN',
                'size' => 'ms',
                'clientOptions' => [
                    'autoclose' => true,
                    'linkFormat' => 'yyyy-mm-dd  HH:ii ',
                    'todayBtn' => true
                ]
            ]);?>
        </div>
    </div>


    <?= $form->field($model, 'content')->textarea(['rows' => 6]) ?>




    <div class="form-group">
        <?= Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
